package com.hg.library.graph;

import android.graphics.Outline;
import android.view.View;
import android.view.ViewOutlineProvider;

/**
 * Created by admin on 2017/2/8.
 */

public class OutlineProvider {

    public static class RoundOutlineProvider extends ViewOutlineProvider{

        private float round;

        public RoundOutlineProvider(float round) {
            this.round = round;
        }

        @Override
        public void getOutline(View view, Outline outline) {
            outline.setRoundRect(0,0,view.getWidth(),view.getHeight(),round);
        }
    }
}
